home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
Projects
/
Stretching the Mind
/
Modulated gen-feigenbaum
< prev
next >
Wrap
Lisp/Scheme
|
1998-10-26
|
4KB
|
101 lines
; modulated feigenbaum
; The following redefines gen-feigenbaum to accept additional vector whose
; values are mixed to the feigenbaum calculation. This enables to get
; less obvious output which still belongs into the feigenbaum catagory.
(defun gen-feigenbaum (r iter add xinit &optional (v #(0)) (pos 0))
(let* ((outv (make-array iter))
(x xinit)
(vmax (length v)))
(dotimes (i iter)
(setq x (* r x (- 1.0 x)))
(setq x (+ x (aref v (mod (+ pos i) vmax))))
(putv outv i x)
(setq r (+ r add)))
outv))
(setq fibmod
(vector-scale -0.15 0.15
(list-to-vector
(gen-fibonacci-trans 9 '(1 2 3) '(4 5 6)))))
;
(def-orchestra 'orchestra
all-instruments (piano)
)
; each of these symbols sound different, evaluate one of them manually and
; then continue evaluating the rest of the score to hear them
(setq symbols
(vector-to-symbol a g (gen-feigenbaum 3.60 256 -0.001 0.1 fibmod 0)))
(setq symbols
(vector-to-symbol a g (gen-feigenbaum 3.60 256 -0.001 0.1 (vector-scale -0.04 0.04 (gen-feigenbaum 2.651 64 0.02 0.1)))))
(setq symbols
(vector-to-symbol a k (gen-feigenbaum 3.60 256 -0.002 0.1 (vector-scale -0.04 0.04 (gen-feigenbaum 2.651 64 0.02 0.1)))))
(setq symbols
(vector-to-symbol a k (gen-feigenbaum 1.160 256 0.0114 0.1
(vector-scale -0.03 0.07 (gen-feigenbaum 2.623 8 0.005 0.999))
4)))
(setq symbols
(vector-to-symbol a k (gen-feigenbaum 1.160 256 0.0114 0.1
(vector-scale -0.03 0.03 (gen-feigenbaum 2.623 4 0.005 0.999))
3)))
(setq symbols
(vector-to-symbol a k (gen-feigenbaum 2.460 256 0.00114 0.01
(vector-scale -0.03 0.03 #(1 2 3 4))
3)))
(setq symbols
(vector-to-symbol a h (gen-feigenbaum 2.460 256 0.002114 0.01
(vector-scale -0.03 0.03 #(1 2 3 4))
3)))
(setq symbols
(vector-to-symbol a h (gen-feigenbaum 2.460 256 0.003414 0.13
(vector-scale -0.03 0.03 #(1 2 3 4))
3)))
(setq symbols
(vector-to-symbol a h (gen-feigenbaum 2.460 256 0.003414 0.13
(vector-scale -0.03 0.03 #(1 2 3 4))
3)))
(setq symbols
(vector-to-symbol a h (gen-feigenbaum 2.460 256 0.003414 0.13
(vector-scale -0.03 0.03 #(1 2 3 4))
4)))
(setq symbols
(vector-to-symbol a h (gen-feigenbaum 2.460 450 0.003414 0.13
(vector-scale -0.02 0.02 #(1 2 3 4))
3)))
(setq symbols
(vector-to-symbol a p (gen-feigenbaum 2.460 450 0.003414 0.13
(vector-scale -0.03 0.02 #(1 2 3 4))
5)))
(def-section sect-a
default
zone (lsym-correct (* (length symbols) (get-ratio '1/16 :ratio)))
tonality (activate-tonality (pentatonic c 4))
length '(1/16)
velocity '(64)
piano
symbol symbols
)
(midiport :printer)
(play-file-p "my song"
all-instruments '(sect-a)
)